<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<!-- BEGIN HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN CONTAINER -->
	<!-- BEGIN CONTENT -->
		<!--表格操作按钮组-->
		<div>
			<a class="btn blue" href="javascript:;"  data-target="#payChannelModel" 
				data-toggle="modal" ng-click="addPayChannel();">
				<i class="fa fa-plus"></i>
					新增
			</a>
		</div>
			<table class="table table-striped table-bordered table-hover" id="table_1">
			<thead>
				<tr>
					<th>编码</th>
					<th>名称</th>
					<th>回调地址</th>
					<th>账户</th>
					<th>是否实时到账</th>
					<th>是否使用</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr class="odd gradeX" ng-repeat="payChannel in payChannelList  track by $index" on-loaded="{{$last}}" target-table="table_1">
					<td>
						<span ng-bind="payChannel.channelCode"></span>
					</td>
					<td>
						<span ng-bind="payChannel.channelName"></span>
					</td>
					<td>
						<span ng-bind="payChannel.callbackUrl"></span>
					</td>
					<td>
						<span ng-bind="payChannel.platAccount"></span>
					</td>
					<td>
						<span ng-bind="payChannel.isRealtime | getValueInStaticFilter : 'realtimeArray'"></span>
					</td>
					<td>
						<span ng-bind="payChannel.isValid | getValueInStaticFilter : 'validArray'"></span>
					</td>
					<td>
						<a class="btn" href="javascript:;"  data-target="#payChannelModel" 
						data-toggle="modal" ng-click="updatePayChannel(payChannel);">
							修改
						</a>
					</td>
				</tr>
			</tbody>
			</table>
		
		<div id="payChannelModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title">支付渠道新增/修改</h4>
					</div>
					<div class="modal-body form">
						<div class="form-group">
							<div class="row">
								<label class="col-sm-3 control-label text-right">渠道编码</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" key="required,maxlength_10" ng-model="selectedPayChannel.channelCode"  ng-disabled="modifyType == 'update'"/>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-3 control-label text-right">渠道名称</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" key="required,maxlength_32" ng-model="selectedPayChannel.channelName"/>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-3 control-label text-right">回调地址</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" key="required,maxlength_200" ng-model="selectedPayChannel.callbackUrl"/>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-3 control-label text-right">平台账户</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" key="required,maxlength_20" ng-model="selectedPayChannel.platAccount"/>
									</div>
								</div>
							</div>
							
							<div class="row">
								<label class="col-sm-3 control-label text-right">公钥</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" key="required,maxlength_200" ng-model="selectedPayChannel.publicKey"/>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-3 control-label text-right">签名类型</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" class="form-control bValidate" key="required,maxlength_10" ng-model="selectedPayChannel.signType"/>
									</div>
								</div>
							</div>


							
							<hr />
							<div class="row">
								<label class="col-sm-3 control-label text-right">是否实时到账</label>
								<div class="col-md-8">
									<div class="radio-list">
										<label  class="radio-inline col-md-4" style="margin:0px;padding: 0px">
											<input ng-model="selectedPayChannel.isRealtime" type="radio"  value="1"
											class="bValidate" key="required" name="isRealtime" 
											ng-selected="selectedPayChannel.isRealtime==1">
												是
										</label>
										<label  class="radio-inline col-md-4" style="margin:0px;padding: 0px">
											<input ng-model="selectedPayChannel.isRealtime" type="radio"  value="0" 
											name="isRealtime" 
											ng-selected="selectedPayChannel.isRealtime==0">
												否
										</label>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-3 control-label text-right">是否启用</label>
								<div class="col-md-8">
									<div class="radio-list">
										<label  class="radio-inline col-md-4" style="margin:0px;padding: 0px">
											<input ng-model="selectedPayChannel.isValid" type="radio"  value="1" 
											ng-selected="selectedPayChannel.isValid==1">
												启用
										</label>
										<label  class="radio-inline col-md-4" style="margin:0px;padding: 0px">
											<input ng-model="selectedPayChannel.isValid" type="radio"  value="0" 
											ng-selected="selectedPayChannel.isValid==0">
												停用
										</label>
									</div>
								</div>
							</div>
							<div class="row">
								<label class="col-sm-3 control-label text-right">备注</label>
								<div class="col-sm-8">
									<div class="input-group">
									<textarea class="form-control bValidate" rows="3" ng-model="selectedPayChannel.remark" key="maxlength_128">
									</textarea>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
						<button type="button" class="btn btn-primary" ng-click="modifyPayChannel();"><i class="fa fa-check"></i>保存</button>
					</div>
				</div>
			</div>
		</div>
</div>
	<!-- END CONTENT -->

<!-- END CONTAINER -->

<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->



</body>
<!-- END BODY -->
</html>
<script src="manageView/assets/scripts/public.js" type="text/javascript"></script>
<script>

// setTimeout(function(){
// 	var tablesOption = datatableOption;
// var table1 = $('#table_1');
// var tb1 = table1.DataTable(tablesOption);
// }, 3000);

</script>